<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>我的订单</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>

    <link rel="stylesheet" type="text/css" href="../css/heard.css"/>

    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript" src="../script/min.js"></script>
    <script type="text/javascript" src="../script/jq.min.js"></script>

    <script type="text/javascript" src="../script/jsviews.js"></script>
    <style>

    </style>
</head>
<body>
<!--顶部标题栏-->
<div class="header" id="topbar">
    <div class="left" tapmode onclick="goback()">
        <img src="../image/fhui.png" alt="" class="logoleft">
    </div>
    <div class="t">
        <span class="title" style="font-size: 1rem">我的订单</span>
    </div>
</div>

<!--内容区-->
<div style="height: 50px;">

</div>

<div id="cont">

</div>
<script id="theTmpl" type="text/x-jsrender">
    <div style="border: 1px #f4f4f4 solid;border-radius:4px;background: white;padding:3px;">
        <div style="padding: 10px;">
            <div style="padding: 15px;">
                <div style="display: inline-block;font-size: 1.1rem;">订单编号：{{>order_num}}</div>
                <div style="display: inline-block;float: right;font-size: 0.8rem;color: rgba(0,0,0,0.58);">时间：{{>add_time}}</div>
            </div>
            <div style="padding: 5px;font-size: 1rem; margin-left: 3%;color: rgba(0,0,0,0.58);">
                {{>remark}}
            </div>
        </div>
    </div>


</script>

</body>
<script type="text/javascript">

    apiready = function () {
        var deviceId = api.deviceId;//设备编码
        get_data(deviceId);
    };

    function get_data(deviceId) {
        //开启加载动画
        api.showProgress({
            title: '努力加载中...',
            modal: false
        });
        $.ajax({
            type: "POST",
            url: "http://www.solearn.top/paotui/public/index.php/index/index/get_order_data",
            dataType: "json",
            data: {deviceId: deviceId},
            success: function (res) {
                api.hideProgress();//关闭加载动画
                if (res.status == 1) {
                    $("#cont").html($.templates("#theTmpl").render(res.result));
                } else {
                    $("#cont").html("<span>暂无数据</span>");
                }
            }
        });
    }

    function goback() {
        api.closeFrame({name: 'order_list'});
    }
</script>
</html>